#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
	int a = 0;
	int n = 0;
	scanf("%d %d", &a,&n);

	/*2+22+222+2222+22222
    a=2
	k = 22   2   *  10 + 2
	k = 222  22  *  10 + 2
	k = 2222 222 *  10 + 2*/

	int k = 0;
	int sum = 0;
	while (n)
	{
		k = k * 10 + a;
		sum += k;
		n--;
	}
	printf("%d", sum);

	return 0;
}
